package com.ticket.system.service.impl;

import java.util.List;
import com.ticket.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ticket.system.mapper.YuanchuRefundOrderDetailMapper;
import com.ticket.system.domain.YuanchuRefundOrderDetail;
import com.ticket.system.service.IYuanchuRefundOrderDetailService;

/**
 * 退款明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-10-31
 */
@Service
public class YuanchuRefundOrderDetailServiceImpl implements IYuanchuRefundOrderDetailService 
{
    @Autowired
    private YuanchuRefundOrderDetailMapper yuanchuRefundOrderDetailMapper;

    /**
     * 查询退款明细
     * 
     * @param id 退款明细主键
     * @return 退款明细
     */
    @Override
    public YuanchuRefundOrderDetail selectYuanchuRefundOrderDetailById(Long id)
    {
        return yuanchuRefundOrderDetailMapper.selectYuanchuRefundOrderDetailById(id);
    }

    /**
     * 查询退款明细列表
     * 
     * @param yuanchuRefundOrderDetail 退款明细
     * @return 退款明细
     */
    @Override
    public List<YuanchuRefundOrderDetail> selectYuanchuRefundOrderDetailList(YuanchuRefundOrderDetail yuanchuRefundOrderDetail)
    {
        return yuanchuRefundOrderDetailMapper.selectYuanchuRefundOrderDetailList(yuanchuRefundOrderDetail);
    }

    /**
     * 新增退款明细
     * 
     * @param yuanchuRefundOrderDetail 退款明细
     * @return 结果
     */
    @Override
    public int insertYuanchuRefundOrderDetail(YuanchuRefundOrderDetail yuanchuRefundOrderDetail)
    {
        yuanchuRefundOrderDetail.setCreateTime(DateUtils.getNowDate());
        return yuanchuRefundOrderDetailMapper.insertYuanchuRefundOrderDetail(yuanchuRefundOrderDetail);
    }

    /**
     * 修改退款明细
     * 
     * @param yuanchuRefundOrderDetail 退款明细
     * @return 结果
     */
    @Override
    public int updateYuanchuRefundOrderDetail(YuanchuRefundOrderDetail yuanchuRefundOrderDetail)
    {
        return yuanchuRefundOrderDetailMapper.updateYuanchuRefundOrderDetail(yuanchuRefundOrderDetail);
    }

    /**
     * 批量删除退款明细
     * 
     * @param ids 需要删除的退款明细主键
     * @return 结果
     */
    @Override
    public int deleteYuanchuRefundOrderDetailByIds(Long[] ids)
    {
        return yuanchuRefundOrderDetailMapper.deleteYuanchuRefundOrderDetailByIds(ids);
    }

    /**
     * 删除退款明细信息
     * 
     * @param id 退款明细主键
     * @return 结果
     */
    @Override
    public int deleteYuanchuRefundOrderDetailById(Long id)
    {
        return yuanchuRefundOrderDetailMapper.deleteYuanchuRefundOrderDetailById(id);
    }
}
